
<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
<!--<html xmlns:th="http://www.thymeleaf.org" xmlns:range="http://www.w3.org/1999/xhtml">   &lt;!&ndash;layout文件路径&ndash;&gt;-->

<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>学生列表</title>

    <!-- jQuery -->
    <script type="text/javascript" src="/js/jquery-3.7.1.min.js"></script>
    <!-- Popper.js 必须在 Bootstrap 之前加载 -->
    <script src="https://unpkg.com/@popperjs/core@2"></script>
    <!-- Bootstrap CSS -->
    <link rel="stylesheet" href="/plugins/bootstrap/css/bootstrap.min.css">

    <!-- FontAwesome -->
    <link rel="stylesheet" href="/plugins/adminlte/adminlteplugins/fontawesome-free/css/fontawesome.min.css">
    <link rel="stylesheet" href="/plugins/adminlte/adminlteplugins/fontawesome-free/css/all.min.css">

<!--    &lt;!&ndash; AdminLTE CSS &ndash;&gt;-->
<!--    <link rel="stylesheet" href="/plugins/adminlte/css/adminlte.min.css">-->

    <!-- Bootstrap Table CSS -->
    <link rel="stylesheet" href="/plugins/bootstraptable/bootstrap-table.min.css">

<!--    &lt;!&ndash; LayUI CSS &ndash;&gt;-->
<!--    <link rel="stylesheet" href="/plugins/layui/css/layui.css">-->

    <style>
        /* 自定义错误提示文字样式 */
        label.error {
            color: red; /* 设置颜色为红色 */
            font-size: 14px; /* 设置字体大小 */
            margin-top: 5px; /* 设置上边距 */
        }
    </style>

</head>

<body>
    <div class="container-fluid">
        <h1 style="text-align:center;margin: 20px auto" >学生信息表</h1>
        <div class="model-header" style="margin: 20px auto">
            <!-- Button trigger modal -->
            <button id="addButton" type="button" class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal" onclick="preAdd();">
                新增学生
            </button>
            <!-- 查询表单 -->
            <div class="form-inline" style="margin-left: 300px">
                <input type="text" id="queryNo" class="form-control" placeholder="学号">
                <input type="text" id="queryName" class="form-control" placeholder="姓名">
                <select id="querySex" class="form-control">
                    <option value="">性别</option>
                    <option value="1">男</option>
                    <option value="2">女</option>
                </select>
                <select id="queryAgeRange" class="form-control">
                    <option value="">年龄段</option>
                    <option value="0-18">0-18</option>
                    <option value="19-30">19-30</option>
                    <option value="31-45">31-45</option>
                    <!-- 其他年龄段选项 -->
                </select>
                <select id="queryScoreRange" class="form-control">
                    <option value="">分数段</option>
                    <option value="0-59">0-59</option>
                    <option value="60-69">60-69</option>
                    <option value="70-79">70-79</option>
                    <option value="80-89">80-89</option>
                    <option value="90-99">90-99</option>
                    <option value="100-100">100</option>
                </select>
                <button style="color:white;background-color:#6686c2" class="btn btn-default" onclick="searchStudents()">查询</button>
            </div>
        </div>
        <!--表格-->
        <table class="table table-striped" id="students" ></table>

    </div>
    <!--模态框-->
    <div class="modal fade" tabindex="-1" role="dialog" id="myModal">
        <div class="modal-dialog" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title">新增学生信息</h4>
                </div>
                <form id="formStudent" >
                    <div class="modal-body">
                        <input hidden="hidden" id="id" name="id" />
                        <div class="form-group">
                            <label for="no">学号</label>
                            <input type="text" class="form-control" id="no" name="no" placeholder="请输入学号" required minlength="10" maxlength="10">
                        </div>
                        <div class="form-group">
                            <label for="name" >姓名</label>
                            <input type="text" class="form-control" id="name" name="name" placeholder="请输入姓名" required minlength="2" maxlength="20">
                        </div>
                        <div class="form-group">
                            <label for="password">密码</label>
                            <input type="password" class="form-control" id="password" name="password" placeholder="请输入密码" minlength="6" maxlength="6">
                        </div>
                        <div class="form-group">
                            <label for="sex">性别</label>
                            <select class="form-control" id="sex" name="sex" >
                                <option value="1">男</option>
                                <option value="2">女</option>
                            </select>
                        </div>
                        <div class="form-group">
                            <label for="age">年龄</label>
                            <input type="text" class="form-control" id="age" name="age" placeholder="请输入年龄"  min="15" max="45">
                        </div>
                        <div class="form-group">
                            <label for="score">分数</label>
                            <input type="text" class="form-control" id="score" name="score" placeholder="请输入成绩"  min="0" max="100">
                        </div>
                    </div>
                    <div class="modal-footer">
                       <!-- 模态框触发按钮 -->
                        <button type="submit" class="btn btn-primary" id="submitButton" >提交更改</button>
                    </div>
                </form>
                <!-- 表单结束-->

            </div><!-- /.modal-content -->
        </div><!-- /.modal-dialog -->
    </div><!-- /.modal -->

<!--    &lt;!&ndash; Popper.js 必须在 Bootstrap 之前加载 &ndash;&gt;-->
<!--    <script src="https://unpkg.com/@popperjs/core@2"></script>-->

    <!-- Bootstrap JS -->
    <script src="/plugins/bootstrap/js/bootstrap.min.js"></script>

    <!-- Bootstrap Table JS -->
    <script src="/plugins/bootstraptable/bootstrap-table.min.js"></script>
    <script src="/plugins/bootstraptable/locale/bootstrap-table-zh-CN.min.js"></script>

<!--    &lt;!&ndash; AdminLTE JS &ndash;&gt;-->
<!--    <script src="/plugins/adminlte/js/adminlte.min.js"></script>-->

<!--    &lt;!&ndash; LayUI JS &ndash;&gt;-->
<!--    <script src="/plugins/layui/layui.js"></script>-->

    <!-- 表单验证 -->
    <script src="/plugins/jqvalidate/jquery.validate.min.js"></script>
    <script src="/plugins/jqvalidate/localization/messages_zh.min.js"></script>

    <!-- 自定义 JS -->
    <script type="text/javascript" src="/pagejs/student/list4.js"></script>

</body>

</html>


